//package com.zhangtai.modules.dao.ssqlDao;
//
//import com.alibaba.fastjson.JSONObject;
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.zhangtai.Neusoft.entity.NeusfotEmployeeChange;
//import com.zhangtai.datasource.annotation.DataSource;
//import com.zhangtai.modules.dto.*;
//import com.zhangtai.modules.entity.employee.EmployeeInfoEntity;
//import com.zhangtai.modules.entity.salary.SalaryGroupEmployeeEntity;
//import org.apache.ibatis.annotations.Mapper;
//import org.apache.ibatis.annotations.Param;
//import org.apache.ibatis.annotations.Select;
//import org.springframework.transaction.annotation.Transactional;
//
//import java.util.List;
//import java.util.Map;
//
//@Mapper
//public interface JobDaoMssql {
//
//    @DataSource("slave1")
//    @Select("select C_OID_ASSIGNEDJOB,C_CODE ,C_NAME from tb_org_assignedjob where 1=1 and C_OID_ASSIGNEDJOB=#{id}")
//    public JobDto findById(Long id);
//
//    @DataSource("slave1")
//    @Select("select * from TB_SYS_CODEITEM where C_OID_CODEITEM=#{id} and C_STATUS='1'")
//    public JSONObject findJobLevelById(Long id);
//
//    @DataSource("slave1")
//    @Select("select C_OID_CODEITEM,C_NAME from TB_SYS_CODEITEM where C_TYPECODE='CODE_recruitweb'")
//    public List<JSONObject> findRecruitWeb();
//
//    @DataSource("slave1")
//    @Select("select C_CODE from TB_SYS_CODEITEM where 1=1 and C_TYPECODE='C_CODE_TIXI'  and c_name like '%${name}%'")
//    public List<Long> findSystemIdByName(@Param("name") String name);
//
//    @DataSource("slave1")
//    @Select("select C_CODE from TB_SYS_CODEITEM where 1=1 and C_TYPECODE='C_CODE_TIAOXIAN'  and c_name like '%${name}%'")
//    public List<Long> findLineIdByName(@Param("name") String name);
//
//    @DataSource("slave1")
//    @Select("select C_OID_ASSIGNEDJOB,C_CODE ,C_NAME from tb_org_assignedjob where c_name like '%${name}%'")
//    public List<Long> findJobIdByJobName(@Param("name") String name);
//
//    @DataSource("slave1")
//    @Select("select C_CODE from TB_INF_EMPLOYEE WHERE C_MYPHONE = #{mobile} ")
//    public List<String> findUserCodeByMobile(@Param("mobile") String mobile);
//
//    @DataSource("slave1")
//    @Select("select C_CODE from TB_INF_EMPLOYEE WHERE C_MYPHONE = #{userid} ")
//    public List<String> findUserCodeByUserId(@Param("userid") String userid);
//
//    @DataSource("slave1")
//    @Select("select orgid from bpm_org where orgname like '%${name}%'")
//    List<Long> findOrgByName(@Param("name") String name);
//
//    @DataSource("slave1")
//    @Select("select C_OID_ASSIGNEDJOB from tb_org_assignedjob where c_name like '%${name}%'")
//     List<Long> findJobIdByName(@Param("name") String name);
//
//    @DataSource("slave1")
//    @Select("<script>" +
//            "select C_OID oid, C_CODE code,C_NAME name from  TB_INF_EMPLOYEE " +
//            "<where> c_unitid=#{orgId} " +
//            "<if test='!isDismiss'>and C_EMPLOYEESTATUS in ('2','9','11') </if> " +
//            "</where>" +
//            "</script>")
//    List<Map<String,Object>> getDepartmentUser(@Param("orgId") Long orgId, @Param("isDismiss") Boolean isDismiss);
//
//    @DataSource("slave1")
//    @Select("select orgid from bpm_org where orgname like '%${name}%'")
//    List<Long> getOrgByName(@Param("name") String name);
//
////    民族
//    @DataSource("slave1")
//    @Select("select C_CODE,C_NAME from TB_SYS_CODEITEM where 1=1  and C_TYPECODE='CODE_Nationality'")
//    List<JSONObject> getNationality();
//
//    /**
//     * 根据岗位id查找体系和条线
//     * @param id
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("SELECT\n" +
//            "        C_OID_ASSIGNEDJOB,\n" +
//            "        c.C_CODE AS C_TIXI,\n" +
//            "        c.C_NAME AS C_TIXINAME,\n" +
//            "        d.C_CODE AS C_TIAOXIAN,\n" +
//            "        d.C_NAME AS C_TIAOXIANNAME \n" +
//            "FROM\n" +
//            "        TB_ORG_ASSIGNEDJOB_APPEND b\n" +
//            "        LEFT JOIN ( SELECT C_CODE, C_NAME FROM TB_SYS_CODEITEM WHERE C_TYPECODE = 'C_CODE_TIXI' ) c ON b.C_TIXI= c.C_CODE\n" +
//            "        LEFT JOIN ( SELECT C_CODE, C_NAME FROM TB_SYS_CODEITEM WHERE C_TYPECODE = 'C_CODE_TIAOXIAN' ) d ON b.C_TIAOXIAN= d.C_CODE \n" +
//            "WHERE\n" +
//            "        b.C_OID_ASSIGNEDJOB= #{id}")
//     JSONObject getTiaoxianTixiByJobId(@Param("id")Long id);
//
//
//
//
//
//    /**
//     * 根据员工姓名和工号模糊查询
//     * @param
//     * @return
//
//     */
//
//    @DataSource("slave1")
//    @Select("<script>" +
//            "select \n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n" +
//            " from tb_inf_employee e  with(nolock)\n" +
//            "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//            "where 1=1" +
//            "<if test='!isDismiss'>" +
//            " and C_EMPLOYEESTATUS in (2,9,11)\n" +
//            "</if>" +
//
//            "<if test='orgIds!=null and orgIds.size>0'> and C_UNITID in " +
//            " <foreach item=\"orgId\" index=\"index\" collection=\"orgIds\" open=\"(\" separator=\",\" close=\")\">#{orgId}</foreach>" +
//            "</if>" +
////            "<if test='orgIds==null or orgIds.size==0'> and C_UNITID = null </if>"+
//
//            "<if test='name!=null'> and C_NAME like '%${name}%'  </if>" +
//            "<if test='code!=null'> and C_CODE= #{code}  </if>"+
//             "</script>")
//    public List<EmployeeInfoEntity> findEmpByCodeFromMssql( @Param("orgIds") List<Long> orgIds,@Param("name") String name,@Param("code") String code,@Param("isDismiss") Boolean isDismiss);
//
//
//    /**
//     * 根据手机号查找
//     * @param mobile
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select \n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_BEGINWORKDATE as beginworkdate,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_KNOWLEDGE as degree,\n" +
//            "e.C_DEGREE as education,\n" +
//            "e.c_specialty as speciality,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "e.C_HEALTH as healthstatus,\n" +
//            "e.C_ADDRESS as address,\n" +
//            "e.C_ZHUANZHENG as regular_day,\n" +
//            "case e.c_tuiwu when '0' then '1' when '2' then '2' end as disbandment,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n"+
//            "from tb_inf_employee e  with(nolock)\n" +
//            "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//            "where C_EMPLOYEESTATUS in (2,9,11)\n" +
//            " and C_MYPHONE=#{mobile}")
//    public EmployeeInfoEntity findEmpByMobile(@Param("mobile") String mobile);
//
//
//
//    /**
//     * 根据身份证号查找
//     * @param
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select \n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_BEGINWORKDATE as beginworkdate,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_KNOWLEDGE as degree,\n" +
//            "e.C_DEGREE as education,\n" +
//            "e.c_specialty as speciality,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "e.C_HEALTH as healthstatus,\n" +
//            "e.C_ADDRESS as address,\n" +
//            "e.C_ZHUANZHENG as regular_day,\n" +
//            "case e.c_tuiwu when '0' then '1' when '2' then '2' end as disbandment,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n"+
//            "from tb_inf_employee e  with(nolock)\n" +
//            "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//            "where 1=1\n" +
//            " and C_IDCARD=#{idcard}\n" +
//            " ORDER BY s.C_RECORDTIME DESC")
//    public List<OldEmployeeBo> findEmpByIdcard(@Param("idcard") String idcard);
//
//
//
//    /**
//     * 根据账号查找
//     * @param
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("SELECT top 1\n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_BEGINWORKDATE as beginworkdate,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_KNOWLEDGE as degree,\n" +
//            "e.C_DEGREE as education,\n" +
//            "e.c_specialty as speciality,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "e.C_HEALTH as healthstatus,\n" +
//            "e.C_ADDRESS as address,\n" +
//            "e.C_ZHUANZHENG as regular_day,\n" +
//            "case e.c_tuiwu when '0' then '1' when '2' then '2' end as disbandment,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n"+
//            "FROM\n" +
//            "\ttb_inf_employee e WITH (nolock)\n" +
//            "LEFT JOIN (\n" +
//            "\tSELECT\n" +
//            "\tc_recordtime,\n" +
//            "\tC_EMPOID\n" +
//            "\tFROM\n" +
//            "\ttb_per_staffrecord WITH (nolock)\n" +
//            "\tWHERE\n" +
//            "\tC_RECORDTYPE IN (4, 6, 5, 8)\n" +
//            ") s ON s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "LEFT JOIN bpm_user d ON e.C_CODE = d.usercode\n" +
//            "WHERE\n" +
//            "\tC_EMPLOYEESTATUS IN (2,9,11)\n" +
//            "AND (useraccount = #{account} or C_MYPHONE=#{account})" +
//            "ORDER BY hiredate DESC ")
//    public EmployeeInfoEntity findEmpByAccount(@Param("account") String account);
//
//    @DataSource("slave1")
//    @Select("<script>SELECT " +
//            "oid," +
//            "cqDays," +
//            "ycqDays," +
//            "ISNULL(CAST(cdDays AS FLOAT),0) + ISNULL(CAST(cd30ys AS FLOAT),0) cdCs ," +
//            "ISNULL(CAST(ztdays AS FLOAT),0) + ISNULL(CAST(zt30ys AS FLOAT),0) ztCs," +
//            "ISNULL(CAST(kgDays AS FLOAT),0) kgDays," +
//            "ISNULL(CAST(sjDays AS FLOAT),0) + ISNULL(CAST(bjDays AS FLOAT),0)+ISNULL(CAST(sangjDays AS FLOAT),0)+ISNULL(CAST(hjDays AS FLOAT),0)+ISNULL(CAST(cjDays AS FLOAT),0)+ISNULL(CAST(pcjDays AS FLOAT),0) qjDays," +
//            "ISNULL(CAST(tmaddDays AS FLOAT),0) tmaddDays " +
//            "FROM " +
//            "TB_V_PZ_CNB_MONTH_REPORT " +
//            "<where> " +
//            "empCode = #{code}" +
//            " and issueMonth &lt;=#{endTime} and issueMonth &gt;=#{startTime} </where> </script>")
//    AttendMonthDto getMonthAttend(@Param("code") String code,@Param("startTime")String startTime,@Param("endTime")String endTime);
//
//
//    /**
//     * 根据账号查找
//     * @param
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select \n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_BEGINWORKDATE as beginworkdate,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_KNOWLEDGE as degree,\n" +
//            "e.C_DEGREE as education,\n" +
//            "e.c_specialty as speciality,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "e.C_HEALTH as healthstatus,\n" +
//            "e.C_ADDRESS as address,\n" +
//            "e.C_ZHUANZHENG as regular_day,\n" +
//            "case e.c_tuiwu when '0' then '1' when '2' then '2' end as disbandment,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n"+
//            "from tb_inf_employee e  with(nolock)\n" +
//            "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//            "where C_EMPLOYEESTATUS in (2,9,11)\n" +
//            " and C_CODE=#{code}"
//    )
//    public EmployeeInfoEntity findEmpByCode(@Param("code") String code);
//
//
//    /**
//     * 根据账号查找  包括离职的
//     * @param
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select \n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_BEGINWORKDATE as beginworkdate,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_KNOWLEDGE as degree,\n" +
//            "e.C_DEGREE as education,\n" +
//            "e.c_specialty as speciality,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "e.C_HEALTH as healthstatus,\n" +
//            "e.C_ADDRESS as address,\n" +
//            "e.C_ZHUANZHENG as regular_day,\n" +
//            "case e.c_tuiwu when '0' then '1' when '2' then '2' end as disbandment,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n"+
//            "from tb_inf_employee e  with(nolock)\n" +
//            "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//            "where 1=1\n" +
//            " and C_CODE=#{code}"
//    )
//    public List<EmployeeInfoEntity> findEmpByCodeAll(@Param("code") String code);
//
//
//    @DataSource("slave1")
//    @Select("select ev.c_orgname orgname,ev.c_code code,ev.c_name name,ev.c_unitname unitname,tv.beldate, " +
//            "max(case when tv.xtime>='07:00:00' and tv.xtime<='10:00:00' then tv.xtime else null end) as startAm,  " +
//            "max(case when tv.xtime>='10:01:00' and tv.xtime<='13:30:00' then tv.xtime else null end) as endAm, " +
//            "max(case when tv.xtime>='13:31:00' and tv.xtime<='16:00:00' then tv.xtime else null end) as startPm, " +
//            "max(case when tv.xtime>='16:01:00' or tv.xtime<'04:00:00' then tv.xtime else null end) as endPm " +
//            "from tb_inf_employee ev " +
//            " left join TB_TMG_CARDRECORD_v tv " +
//            "   on ev.c_employeeid = tv.c_empoid  " +
//            "where tv.beldate>=convert(datetime, #{startTime})  " +
//            "and tv.beldate<=convert(datetime, #{endTime}) " +
//            "and  ( ev.c_code LIKE '%${code}%'  OR  '${code}' = '-1' )" +
//            "and ev.c_unitid  " +
//            " in (select o.c_orgunitid " +
//            "                        from tb_org_unitrelation o " +
//            "                       where  o.c_hiberarchyId = 1 " +
//            "                         and C_STATUS=1)" +
//            "group by  ev.c_orgname ,ev.c_code,ev.c_name,ev.c_unitcode,ev.c_unitname,tv.beldate " +
//            "order by ev.c_unitcode,ev.c_code,tv.beldate desc" +
//            "")
//    List<AttendDto> getAttendDtoList(@Param("startTime") String startTime,
//                               @Param("endTime") String endTime,
//                               @Param("orgId") Long orgId,
//                                     @Param("code") String code);
//
//    @DataSource("slave1")
//    @Select("select C_OID_GROUP as coidGroup,C_NAME as cname,C_PAYDATE as cpaydate,C_ORGUNITID as orgId  from tb_cnb_group where C_STATUS ='1' and C_NAME !='测试信息组'  and C_NAME !='咖啡厅' and  C_ENDDATE=null and C_NAME !='彰泰集团薪资组(统计数据）' ORDER BY C_ORDER")
//    public List<SalaryGroupDto> findAllsalaryGroupFromSsql();
//
//    @DataSource("slave1")
//    @Select("SELECT a.C_OID_GROUP AS coidGroup,a.C_NAME AS cname,a.C_PAYDATE AS cpaydate,a.C_ORGUNITID AS orgId FROM tb_cnb_group a LEFT JOIN TB_CNB_EMPLOYEEGROUP b ON b.C_OID_EMPLOYEEGROUP =a.C_OID_GROUP WHERE a.C_STATUS ='1' AND b.C_ENDDATE IS NULL AND a.C_NAME !='测试信息组' AND a.C_NAME !='咖啡厅' AND a.C_NAME !='彰泰集团薪资组(统计数据）' ORDER BY a.C_ORDER")
//    public List<SalaryGroupDto> findAllsalaryGroupFromSsql2();
//
//
//    /*
//    查询所有奖惩类型
//     */
//    @DataSource("slave1")
//    @Select("select C_OID_CODEITEM as id,C_CODE as code,C_NAME as name from dbo.TB_SYS_CODEITEM where C_TYPECODE=  'XMLB' and C_STATUS=1")
//    public List<JSONObject> findReAndPu();
//
//    /**
//     * 根据部门id查找员工
//     */
//    @DataSource("slave1")
//    @Select("<script>" +
//            "select \n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_BEGINWORKDATE as beginworkdate,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_KNOWLEDGE as degree,\n" +
//            "e.C_DEGREE as education,\n" +
//            "e.c_specialty as speciality,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "e.C_HEALTH as healthstatus,\n" +
//            "e.C_ADDRESS as address,\n" +
//            "e.C_ZHUANZHENG as regular_day,\n" +
//            "case e.c_tuiwu when '0' then '1' when '2' then '2' end as disbandment,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n"+
//            "from tb_inf_employee e  with(nolock)\n" +
//            "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//            "where C_EMPLOYEESTATUS in (2,9,11)\n" +
//            "<if test='orgIds!=null and orgIds.size>0'> and C_UNITID in " +
//            " <foreach item=\"orgId\" index=\"index\" collection=\"orgIds\" open=\"(\" separator=\",\" close=\")\">#{orgId}</foreach>" +
//            "</if>" +
//            "</script>")
//    public List<EmployeeInfoEntity> findEmpByUnitIds(@Param("orgIds")List<Long> orgIds);
//
//
//    @DataSource("slave1")
//    @Select("select C_EMPOID oid,a.C_CODE contract_no,C_BEGINDATE contractBeginDate,C_EXPIREDATE contractEndDate,C_TERMINATEDATE terminateDate,C_SIGNEDDATE signDate,C_SIGNUNITID unit_id,C_CONTRACTJIAFANG employer_company_id,b.c_code code,b.C_IDCARD idCard  " +
//            "from tb_per_contract a RIGHT  JOIN (select C_OID,c_name,c_code,C_IDCARD from TB_INF_EMPLOYEE where C_EMPLOYEESTATUS in (2,9,11) ) b on a.C_EMPOID=b.C_OID where (a.c_contractstatus='2' or a.c_contractstatus ='1') and a.C_CONTRACTISUSING = '1' and C_EXPIREDATE > #{date}  order by C_EXPIREDATE desc")
//    List<ContractRecordSsqlDto>     getAllContractRecord(@Param("date") String date);
//
//    /**
//     * 查询所有岗位
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_OID_ASSIGNEDJOB,C_CODE ,C_NAME from tb_org_assignedjob ")
//    public List<JobDto> findAllJob();
//
//    /**
//     * 根据部门id查询岗位
//     * @param unitId
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_OID_ASSIGNEDJOB,C_CODE ,C_NAME from tb_org_assignedjob where 1=1 and C_STATUS=1 and C_ORGUNITID=#{unitId}")
//    public List<JobDto> findJobByUnitId(@Param("unitId") Long unitId);
//
//
//    /**
//     * 查询所有职级
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_OID_CODEITEM,C_NAME,C_TYPECODE,C_CODE from TB_SYS_CODEITEM where (C_TYPECODE ='CODE_MANAGEMENTRANK' or C_TYPECODE='CODE_PROFESSIONALRANK') and C_STATUS='1'")
//    public List<JSONObject> findAllJobLevel();
//
//    /**
//     * 查询所有组织
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select orgid,orgname,pareorgid,pareorgname FROM bpm_org where orgname not like '%禁用%'")
//    public List<JSONObject> findAllOrg();
//
//    /**
//     * 根据id查询组织机构
//     * @param orgid
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select orgid,orgname,pareorgid,pareorgname FROM bpm_org where orgid=#{orgid}")
//    public JSONObject findOrgById(@Param("orgid") Long orgid);
//
//    /**
//     * 查找籍贯树
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_OID_CODEITEM, C_CODE, C_PARANTID, C_NAME from TB_SYS_CODEITEM where C_TYPECODE='CODE_AdministrationArea'")
//    public List<JSONObject> findAllNativeplace();
//
//    /**
//     * 查询所有体系
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_CODE,C_NAME from TB_SYS_CODEITEM where 1=1 and C_TYPECODE='C_CODE_TIXI' ORDER BY C_ORDER ASC")
//    public List<JSONObject> findAllOrgSystemEntity();
//
//    /**
//     * 查询所有体系
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_CODE,C_NAME from TB_SYS_CODEITEM where 1=1 and C_TYPECODE='C_CODE_TIAOXIAN' ORDER BY C_ORDER ASC")
//    public List<JSONObject> findAllOrgLineEntity();
//
//    /**
//     * genjuid查找体系
//     * @param id
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_CODE,C_NAME from TB_SYS_CODEITEM where 1=1 and C_TYPECODE='C_CODE_TIXI'  and C_CODE=#{id}")
//    public JSONObject findSystemById(@Param("id") Long id);
//
//    /**
//     * 根据id查找条线
//     * @param id
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_CODE,C_NAME from TB_SYS_CODEITEM where 1=1 and C_TYPECODE='C_CODE_TIAOXIAN'  and C_CODE=#{id}")
//    public JSONObject findLineById(@Param("id") Long id);
//
//
//    /**
//     * 通用查询对应的字典表
//     * @param typeCode
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_CODE,C_NAME from TB_SYS_CODEITEM where C_TYPECODE=#{typeCode}")
//    public List<Map<String,String>> findDictionary(@Param("typeCode") String typeCode);
//
//    /**
//     * 查询专业类型
//     * @param typeCode
//     * @return
//     */
//    @DataSource("slave1")
//    @Select("select C_OID_CODEITEM  ccodeitem,C_CODE ccode,C_NAME cname,C_PARANTID  cparantid from TB_SYS_CODEITEM where C_TYPECODE=#{typeCode}")
//    public List<professionstyleDto> findProfessionstyle(@Param("typeCode") String typeCode);
//
//
//    @DataSource("slave1")
//    @Select("select C_CODE from TB_SYS_CODEITEM where C_OID_CODEITEM=#{id}")
//    @Transactional
//    String getCodeById(@Param("id") Long id);
//
//
//    @DataSource("slave1")
//    @Select("select empCode from TB_V_PZ_STA_STAFFRECORD WHERE operateTime >=#{startTime} AND operateTime <= #{endTime} GROUP BY empCode")
//    List<String> getEmployeeChangeDaily(@Param("startTime") String startTime,@Param("end")String end);
//
//
//    @DataSource("slave1")
//    @Select("select * from TB_V_PZ_STA_STAFFRECORD where empCode = #{code} order by beginDate desc")
//    List<NeusfotEmployeeChange> getEmployeeChangeList(@Param("code") String code, String startTime, String end, IPage<NeusfotEmployeeChange> page);
//
//    @DataSource("slave1")
//    @Select("SELECT\n" +
//            "\t*\n" +
//            "FROM\n" +
//            "\tTB_V_PZ_STA_STAFFRECORD t1\n" +
//            "WHERE\n" +
//            "\tbeginDate >= (SELECT max(beginDate) beginDate FROM TB_V_PZ_STA_STAFFRECORD where empCode = #{code} and recordType = '入职' )\n" +
//            "\tand empCode = #{code}  ")
//    List<NeusfotEmployeeChange> getEmployeeNode(@Param("code") String code);
//
//
//    @DataSource("slave1")
//    @Select("<script>select C_OID_GROUP as coidGroup,C_NAME as cname,C_PAYDATE as cpaydate  from tb_cnb_group where" +
//            "  C_OID_GROUP IN"+
//            "<foreach collection=\"ids\" item=\"item\" index=\"index\" "+
//            "open=\"(\" separator=\",\" close=\")\">"+
//            "#{item}"+
//            "</foreach>"+
//            "  ORDER BY C_ORDER</script>")
//     List<SalaryGroupDto> findAllsalaryGroupFromSsqlAuth(@Param(value = "ids") List<Long> ids);
//
//    @DataSource("slave1")
//    @Select("SELECT * from TB_V_PZ_CNB_SALARY_GROUP where operatetime > '${operateTime}' and  endDate IS NULL and  empCode IS NOT NULL")
//    public List<SalaryGroupEmployeeEntity> getEmployeeSalaryGroup(@Param("operateTime")String operateTime);
//}
